home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-12-31 | 39.1 KB | 1,051 lines | [ TEXT/R*ch]
C.S.M.P. Digest Tue, 18 Aug 92 Volume 1 : Issue 170 Today's Topics: Sockets interface to MacTCP Beginner want to know about _Jackson Selecting graphics Building Installation Disks Gettting the size of a window or Graf Port How to play MIDI resources? What is LDIVT (referenced in an MPW .o/.lib file?) texedit records >32K (SUMMARY) Has anybody got disk dragging to work? ioCompletion and AppleTalk Catching phys ATalk connection The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly. The digest is a collection of article threads from the internet newsgroup comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi- regularly and want an archive of the discussions. If you don't know what a newsgroup is, you probably don't have access to it. Ask your systems administrator(s) for details. (This means you can't post questions to the digest.) Each issue of the digest contains one or more sets of articles (called threads), with each set corresponding to a 'discussion' of a particular subject. The articles are not edited; all articles included in this digest are in their original posted form (as received by our news server at cs.uoregon.edu). Article threads are not added to the digest until the last article added to the thread is at least one month old (this is to ensure that the thread is dead before adding it to the digest). Article threads that consist of only one message are generally not included in the digest. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu [128.223.8.8] in the directory /pub/mac/csmp-digest. Be sure to read the file /pub/mac/csmp-digest/README before downloading any files. The most recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the directory /info-mac/digest/csmp. If you don't have ftp capability, the sumex archive has a mail server; send a message with the text '$MACarch help' (no quotes) to LISTSERV@ricevm1.rice.edu for more information. The digest is also available via email. Just send a note saying that you want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will automatically receive each new issue as it is created. Sorry, back issues are not available through the mailing list. Send administrative mail to mkelly@cs.uoregon.edu. ------------------------------------------------------- From: MikeSummers@cup.portal.com (Michael - Summers) Subject: Sockets interface to MacTCP Date: 14 Jul 92 16:30:51 GMT Organization: The Portal System (TM) Does anyone in NetLand have a pointer to a UNIX sockets interface that will work with MacTCP? Much thanks in advance, Mike. +++++++++++++++++++++++++++ From: jbrowne@void.ncsa.uiuc.edu (Jim Browne) Organization: University of Illinois at Urbana Date: Tue, 14 Jul 1992 22:39:04 GMT MikeSummers@cup.portal.com (Michael - Summers) writes: >Does anyone in NetLand have a pointer to a UNIX sockets interface that >will work with MacTCP? >Much thanks in advance, Mike. You can try Charlie's socket library in misc/unsupported on ftp.ncsa.uiuc.edu - -- Jim Browne | jbrowne@ncsa.uiuc.edu | NCSA/STG System Administrator | stgadmin@ncsa.uiuc.edu | System Administration: Where the fun never ends... | (217) 244-7798 | I've nuked the .sig 'cause Usenet Looooooooooosers are retentive about spelling. +++++++++++++++++++++++++++ From: ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson) Organization: University of Illinois at Urbana-Champaign Date: Wed, 15 Jul 1992 00:02:53 GMT >MikeSummers@cup.portal.com (Michael - Summers) writes: >>Does anyone in NetLand have a pointer to a UNIX sockets interface that >>will work with MacTCP? >>Much thanks in advance, Mike. If you are not a fan of sockets, you can always try the Think C MacTCP classes. You'll find them at ftp.brown.edu in /pub/tcl/... - -- Eric E Johnson | "For a successful technology, reality must ejohnson@a.cs.uiuc.edu | take precedence over public relations, for eej37047@uxa.cso.uiuc.edu | Nature cannot be fooled." - Richard Feynman +++++++++++++++++++++++++++ From: davidp@calvin.usc.edu (David Peterson) Date: 15 Jul 1992 12:58:49 -0700 Organization: University of Southern California, Los Angeles, CA In article <1992Jul15.000253.12010@sunb10.cs.uiuc.edu>, ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson) writes: |> >MikeSummers@cup.portal.com (Michael - Summers) writes: |> |> >>Does anyone in NetLand have a pointer to a UNIX sockets interface that |> >>will work with MacTCP? |> |> >>Much thanks in advance, Mike. |> |> If you are not a fan of sockets, you can always try the Think C MacTCP |> classes. You'll find them at ftp.brown.edu in /pub/tcl/... |> I've got a C++ class that wraps around the MacTCP calls pretty well. Its got some higher level routines that mimic BSD sockets (sort of). All the receiving is done "at interupt" so you don't have to mess with timeouts and retries. If anyone is interested drop me a line. - -dave. Note: You won't be able to use my code to compile BSD source, the semantics are similar, but not the same. Even though, its easier than the suite of PBControl calls. --------------------------- From: abduls@aix.rpi.edu (Saiful Azuan Abdul Aziz) Subject: Beginner want to know about _Jackson Organization: Rensselaer Polytechnic Institute, Troy, NY Date: Wed, 15 Jul 1992 09:43:45 GMT Hi all Mac gurus, Recently, while doing some programming, I got a bus error. MacsBug told me that it happened while my program tried to fetch some instructions in _Jackson. System Error #25 also occurred while my program tried to call _Jackson. Question : What is the trap called _Jackson. What _Jackson did exactly. Is there any documentation about this trap? I tried to look up in IM but no luck at all. Can somebody tell me. Extra credit : Who is _Jackson? Somebody in apple may be? Thanks in advance. Saiful ********** internet: abduls@rpi.edu bitnet:saiful@rpitsmts aol:azrin compu$erve:70760,371 +++++++++++++++++++++++++++ From: Bruce.Hoult@bbs.actrix.gen.nz Date: Wed, 15 Jul 1992 15:06:45 GMT Organization: Actrix Information Exchange In article <50jx#+r@rpi.edu> abduls@aix.rpi.edu (Saiful Azuan Abdul Aziz) writes: > Extra credit : Who is _Jackson? Somebody in apple may be? _Jackson is "Jackson Pollock", a famous abstract expressionist drip painter -- check your copy of the after dark module "Modern Art" for more details :-) It was also the internal name for 32-bit Quickdraw. The chances are that your crash has nothing to do with the _Jackson routine, it's just that Macsbug couldn't find any better name for that part of the ROMs -- you'll probably find that the offset was something humungous, e.g. _Jackson + XXXX. _Jackson seems to have taken the place of _StripAddress as the bogus crash point of choice... - -- Bruce - -- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 477 2116 BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB hard disk that fits in your pocket!" "Great! Is it PC compatable?" +++++++++++++++++++++++++++ From: lari@jackson.cs.unc.edu (Humayun Lari) Date: 15 Jul 92 19:34:38 GMT Organization: University of North Carolina, Chapel Hill In article <1992Jul15.150645.593@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes: >The chances are that your crash has nothing to do with the _Jackson routine, >it's just that Macsbug couldn't find any better name for that part of the >ROMs -- you'll probably find that the offset was something humungous, e.g. >_Jackson + XXXX. Since the original poster said that Macsbug reported a system error of 25, it could well be that QuickDraw simply ran out of memory. If so, the PC should point to a _Debugger instruction (I think the location is _Jackson + $0000). Of course, this should only happen if the programmer's done something insanely strange. :-) (This is documented in the Q&A Stack, BTW). > _Jackson seems to have taken the place of _StripAddress >as the bogus crash point of choice... Yeah, why *does* that always happen?!?! :-) Humayun Lari (lari@cs.unc.edu) ObSig: "Technology changes rapidly; people and meaning do not." -- Kevin Bjorke +++++++++++++++++++++++++++ From: sll2@cunixa.cc.columbia.edu (Steven L Levitt) Organization: Columbia University Date: Wed, 15 Jul 1992 19:09:23 GMT In article <50jx#+r@rpi.edu> abduls@aix.rpi.edu (Saiful Azuan Abdul Aziz) writes: >Hi all Mac gurus, > Recently, while doing some programming, I got a bus error. MacsBug told me that it happened while my program tried to fetch some instructions in _Jackson. System Error #25 also occurred while my program tried to call _Jackson. > >Question : What is the trap called _Jackson. What _Jackson did exactly. Is there any documentation about this trap? I tried to look up in IM but no luck at all. Can somebody tell me. > >Extra credit : Who is _Jackson? Somebody in apple may be? > >Thanks in advance. > >Saiful >********** >internet: abduls@rpi.edu bitnet:saiful@rpitsmts aol:azrin compu$erve:70760,371 > I believe _Jackson may be a QuickDraw related trap. In a book I recently bought, _Programming QuickDraw_, the authors, David A. Surovell, Frederick M. Hall and Konstantin Othmer, make passing reference to the fact that when color QuickDraw was being developed, it was nicknamed Jackson Pollack (asp?, after the artist. I don't believe the book ever mentions any kind of trap, however. - ---------------- Steven L. Levitt sll2@cunixa.cc.columbia.edu An Undergrad --------------------------- From: erh0362@tesla.njit.edu (Elliotte Rusty Harold) Subject: Selecting graphics Date: 15 Jul 92 12:38:37 GMT Organization: New Jersey Institute of Technology Can anyone help me with some advice or sample source code on selections in a graphics program? All my references deal strictly with selecting things as text. I want to be able to click and drag over a rectangular grid of squares and store the resulting rectangle as a PICT and as a private kind of scrap on the clipboard. I'd like to draw a dotted-line-bordered rectangle as I drag as seems to be the standard in draw and paint applications. Does anyone have any hints for doing this? Elliotte Rusty Harold Department of Applied Mathematics elharo@m.njit.edu New Jersey Institute of Technology erh0362@tesla.njit.edu Newark, NJ 07103 +++++++++++++++++++++++++++ From: oster@well.sf.ca.us (David Phillip Oster) Organization: Whole Earth 'Lectronic Link Date: Thu, 16 Jul 1992 05:58:57 GMT In article <1992Jul15.073837.1@tesla.njit.edu> erh0362@tesla.njit.edu (Elliotte Rusty Harold) writes: > Can anyone help me with some advice or sample source code on selections >in a graphics program? The basic idea is as follows (forgive me, this is off the top of my head) Point where, anchor, oldWhere; Rect marqueeR; GetMouse(&where); oldWhere = anchor = where; PenPat(gray); PenMode(patXor); while(StillDown()){ GetMouse(&where); if( ! EqualPt(where, oldWhere)){ FrameRect(&marqueeR); Pt2Rect(where, anchor, &marqueeR); FrameRect(&marqueeR); oldWhere = where; } } PenNormal(); In order to get the "moving ants" animation, things are a little trickier. Instead of the n ormal 0101010 gray, you use 011011011 as the gray. Each time through the loop, you check TickCount(). If TickCount() has changed, you compute a new pattern such that when you Xor the new pattern with 0110110 you get 1011011 and FrameRect the marqueeR with this combined pattern. You then remember that the pattern of the marqueeR is now 1011011, so you can handle updtae events. You put the same code in your idle event handler. The whole works takes a couple of 100 lines of code to do it right. --------------------------- From: wa366@sdcc12.ucsd.edu (Scott Kelley) Subject: Building Installation Disks Date: 15 Jul 92 15:21:18 GMT Can anyone offer me any suggestions on how I should set up our installation procedure for our software? We're writing a large multimedia program using MacroMind Director. Currently the files take 7.5mb of disk space, but this will eventually get a LOT bigger (i.e. someday we may have to break down and go to CD's) since the project is still in it's early stages. We'd like to have as simple a setup as possible, since most of the people we send disks out to (they're only demo copies now, showing what we've already done) aren't all that computer-literate. Our current setup requires the user to run two self-extracting archives, and then copy some additional files into specific folders with specific names. Very messy. What I'm wondering is, can any of the commercial archivers (Stuffit, Compact Pro) build an automated self-extracting archive that spans multiple volumes? I've played with some of them, and all I can seem to get is an archive that the user has to combine manually. But we need the process to be automatic. (I should also add that so far we haven't generated a file that won't fit onto an HD disk after it's been compressed, but that will eventually change too...) The other alternative I'm thinking of is licensing Apple's installer, along with a compression engine for the installer (like the one used in the Word 5 install). We don't need all of the fancy options that Apple's installer offers YET, but that too may change. Regardless of what we do, some kind of compression is required. We get about 50-60% compression of our files no matter what archiver we use. Can anyone give me any suggestions or recommendations? Thanks, Scott - ------------------------------------------------- Scott Kelley, sakelley@ucsd.edu, (619) 534-8560 Multimedia Interactive Learning Laboratory (MILL) Department of Biology, UC San Diego - ------------------------------------------------- +++++++++++++++++++++++++++ From: anders@verity.com (Anders Wallgren) Date: 15 Jul 92 16:41:01 GMT Organization: Verity, Inc., Mountain View, CA, USA In article <35700@sdcc12.ucsd.edu> Scott Kelley, wa366@sdcc12.ucsd.edu writes: >What I'm wondering is, can any of the commercial archivers (Stuffit, >Compact Pro) build an automated self-extracting archive that spans >multiple volumes? Stuffit has action atoms for Apple's Installer that allows you to do this. --------------------------- From: Jerome Chan <yjc@po.cwru.edu> Subject: Gettting the size of a window or Graf Port Organization: Alethea, The Twilight World! Date: Thu, 16 Jul 92 03:02:58 GMT How does one get the dimensions of a window? I'm trying to centre a window before bringing it up. System 7 has the auto positioning (check out the ResEdit 2.11) but I am writing for some system 6.x machines as well. Do I use portRect? Someone mentioned that I should use visRgn instead. Is there a FAQ somewhere that I could look through? - --- Fading "No Lah! Sure or not one? Dunno leh! Nebber Mind! Like that one! Terriblur Lah!" +++++++++++++++++++++++++++ From: oster@well.sf.ca.us (David Phillip Oster) Organization: Whole Earth 'Lectronic Link Date: Thu, 16 Jul 1992 06:20:01 GMT In article <1992Jul16.030258.11334@usenet.ins.cwru.edu> Jerome Chan <yjc@po.cwru.edu> writes: _> How does one get the dimensions of a window? I'm trying to centre a _>window before bringing it up. _> Do I use portRect? Someone mentioned that I should use visRgn instead. _>Is there a FAQ somewhere that I could look through? thePort->portRect gives you the size of the window's content area. If the window almost fills the screen, this can put the titlebar under the menubar. Better you should use (**thePort->visRgn).rgnBBox (good idea to copy it into a temporary rect, in case the stuff you are using moves memory, since the visRgn is a handle.) The visRgn is in window local coordinates, so for a normal, 20 pixel high title bar, the top will be at -20. +++++++++++++++++++++++++++ From: jcav@quads.uchicago.edu (JohnC) Organization: The Royal Society for Putting Things on Top of Other Things Date: Thu, 16 Jul 1992 16:44:05 GMT In article <BrGxLE.LIF@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes: >In article <1992Jul16.030258.11334@usenet.ins.cwru.edu> Jerome Chan <yjc@po.cwru.edu> writes: >_> How does one get the dimensions of a window? I'm trying to centre a >_>window before bringing it up. > >_> Do I use portRect? Someone mentioned that I should use visRgn instead. >_>Is there a FAQ somewhere that I could look through? > >thePort->portRect gives you the size of the window's content area. If theu >window almost fills the screen, this can put the titlebar under the menubar. >Better you should use (**thePort->visRgn).rgnBBox (good idea to copy it into a >temporary rect, in case the stuff you are using moves memory, since the visRgn >is a handle.) The visRgn is in window local coordinates, so for a normal, >20 pixel high title bar, the top will be at -20. Um, I think you want to look at the boundary box of the structure region, not the visRgn. The titlebar area is not part of the grafPort of the window itself. - -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953 B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637 --------------------------- From: ccmlh@buitc.bu.edu (Mark Hayes) Subject: How to play MIDI resources? Date: 16 Jul 92 04:41:37 GMT Organization: Boston University, Boston, MA, USA I was just poking around with ResEdit inside the game "Prince of Persia" (which features some very nice music), and noticed a set of resources with type "MIDI". Much to my surprise, when I looked at the actual data, the individual resources turned out to be in standard MIDI file format! And indeed, when I copied one out and saved it in a file, I was able to import it into the MIDI application TRAX, and there was my Yamaha synth, playing the theme from "Prince of Persia"! My question is, how does the game play those MIDI resources? Is there direct support in the system for this, or would the developers have had to do a lot of MIDI support coding themselves? I couldn't find any help on this in Inside Macintosh, though there were a few cryptic references to MIDI; volume VI, in fact, says not a word about MIDI. Help, anyone? If there is direct system support for playing MIDI files, I would love to take a shot at coding what might be a fairly simple application to play MIDI files directly through the Mac sound hardware. As far as I know, there are no applications, and certainly no shareware applications, that currently do this. Thanks to anyone for any help they can offer. +++++++++++++++++++++++++++ From: zobkiw@world.std.com (Joe Zobkiw) Date: 16 Jul 92 16:56:05 GMT Organization: The World Public Access UNIX, Brookline, MA Playing MIDI resources using the Sound Manager is something that you have to roll yourself. There is no direct support for this in the Toolbox. Not yet anyway ;) There is a program available that exhibits this technology called MIDI CD. It is one of the best implementations I have seen (and one of the _only_) - -- - ------------------------------------------------------------- joe zobkiw zobkiw@world.std.com aol: aflzobkiw --------------------------- From: perm@csd.uu.se (Per Mildner) Subject: What is LDIVT (referenced in an MPW .o/.lib file?) Organization: Computing Science Dept.,Uppsala University, Sweden Date: Thu, 16 Jul 1992 10:38:55 GMT I'm trying to convert some MPW .o and .lib files for use with Think C (5.02). I get a link error for a routine LDIVT. When I add one of my own it gets called (surprise :-) and I have little idea what it should do. I know about ldiv and the ldiv_t type but that is probably not the same thing. I have looked in the MPW C manuals but cannot find it. Any help appreciated, - -- Per Mildner perm@CSD.UU.SE Computing Science Dept. tel: +46 18181049 Uppsala University, Sweden fax: +46 18521270 +++++++++++++++++++++++++++ From: perm@csd.uu.se (Per Mildner) Date: 16 Jul 92 15:22:18 GMT Organization: Computing Science Dept.,Uppsala University, Sweden In article <PERM.92Jul16113855@meryl.csd.uu.se> perm@csd.uu.se (Per Mildner) writes: I'm trying to convert some MPW .o and .lib files for use with Think C (5.02). I get a link error for a routine LDIVT. ... -- After a little mucking around I found this to be the long div instruction missing in processors less than 68020. (Also confirmed by a bug note for MPW C 3.2) long LDIVT(void) { register long x; register long y; asm { move.l d0, x move.l d1, y }; return x/y; } seems to do the trick. Somebodys code generator is bogus as y always was 8 in the libs... If somebody's interested, this trick makes the expensive Oracle libs work with the Think C debugger... Happy hacking, - -- Per Mildner perm@CSD.UU.SE Computing Science Dept. tel: +46 18181049 Uppsala University, Sweden fax: +46 18521270 --------------------------- From: rrwood@uuisis.isis.org (Roy Wood) Subject: texedit records >32K (SUMMARY) Organization: International Shared Information Service (Ottawa) Date: Sat, 11 Jul 92 17:59:15 GMT Thanks to everyone who responded to my question about whether there is a publicly available hack to replace TextEdit and correctly work with records larger than 32K. Basically, there's a TCL package available from ftp.brown.edu, or a commercial package. Here's the info: From: zobkiw@world.std.com (Joe Zobkiw) Check out ftp.brown.edu in the pub/tcl directory. There is a file by Chris Wysocki called (I think) CPEdit.c which is a THINK C TCL class that implements a >32K text editing engine. (Vince Vann mentioned this package, too) From: siegel@world.std.com (Rich Siegel) Subject: Re: textedit files >32K ? Thanks for your interest in the Programmer's Editor Package (PE Package). If you wish to order, you should send payment and a request to me directly: Rich Siegel 6 Village Way #23 Natick, MA 01760 Cashier's check or bank draft is preferred. US funds are required. Orders paid with personal check will be held until the check clears. Presently, the time to fill an order is two to three weeks. Here is pricing info. If you have specific technical questions or pricing needs, please let me know. - ---- Pricing is as follows: - single-user upgrade for users of the Symantec CAPPS package $25 (requires original labeled floppy or other conclusive proof or purchase) - single-user new copy price (includes printed documentation) $75 Licenses are available to use PEP for other than individual use. Add the price to the single-user upgrade or single-user new copy price, whichever is appropriate. - product license for producers of freeware programs $1 (for software authors who will release free programs which use any part of the PEP package) - product license for producers of shareware programs $50 (for software authors who will release shareware programs which use any part of the PEP package) - product license for commercial or in-house use $100 (for software authors who will release programs for commercial sale or corporate in-house use) Again, thanks to all who replied. - -Roy --------------------------- From: mxmora@unix.sri.com (Matthew Xavier Mora) Subject: Has anybody got disk dragging to work? Date: 14 Jul 92 01:37:59 GMT Organization: SRI International In article <62042@cup.portal.com>, MacUserLabs@cup.portal.com (Stephan - Somogyi) wrote: > > mxmora@unix.sri.com (Matthew Xavier Mora) writes: > > >I'm working on a system seven only app and I can't get disk "drag and drop" > >to work. I did everyting IM vol 6 said to do but the finder will not hilight > >my app when I drag a disk icon over it. > > Works swimmingly for my app. I have a BNDL/FREF with 'disk' as the doc type > and no icon for that type. > > Could you expound on what you've tried, to provide some context? With more > information we might be able to narrow this down. > > ________________________________________________________________________ > Stephan Somogyi peace, happiness, pancakes MacUser Sure, I created a bndl resource with a file type of 'APPL','trak', and 'disk'. The size resource says that I'm apple event aware. I don't have a '****' file type because I don't deal with all files. Just certain disks, mainly cd audio disks. In my testing I'm trying to drag any kind of disk but none highlight my app and launch it. I rebuilt my desktop but to no avail. My beta testers say that it doesn't work on their macs either (assuming that my desktop might be littered with multiple versions of my program.) I would be glad to send the program to someone if they think they can tweek the bndl to get it to work. I guess my main question is do I need the 'fold' and '****' to make the 'disk' part work? Matt +++++++++++++++++++++++++++ From: leonardr@ccs.itd.umich.edu Organization: Campus Computing Sites, University of Michigan-Ann Arbor Date: Tue, 14 Jul 92 06:16:16 GMT In article <mxmora-130792183032@css-mac1.sri.com> mxmora@unix.sri.com (Matthew Xavier Mora) writes: >In article <62042@cup.portal.com>, MacUserLabs@cup.portal.com (Stephan - >Somogyi) wrote: >> >> mxmora@unix.sri.com (Matthew Xavier Mora) writes: >> >> >I'm working on a system seven only app and I can't get disk "drag and drop" >> >to work. I did everyting IM vol 6 said to do but the finder will not hilight >> >my app when I drag a disk icon over it. >> >> Works swimmingly for my app. I have a BNDL/FREF with 'disk' as the doc type >> and no icon for that type. >> >I created a bndl resource with a file type of 'APPL','trak', and 'disk'. >The size resource says that I'm apple event aware. I don't have a '****' >file type because I don't deal with all files. Just certain disks, mainly >cd audio disks. >I guess my main question is do I need the 'fold' and '****' to make the 'disk' >part work? > For reasons that no one has ever explaned to me (other than a bug in the Finder ;), you MUST have '****' to use either fold or disk - you don't have to have all three. - -- - ----------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu Director of Advanced Technology AppleLink: MACgician Aladdin Systems, inc. GEnie: MACgician +++++++++++++++++++++++++++ From: fprefect@engin.umich.edu (Matt Slot) Date: 14 Jul 92 13:49:53 GMT Organization: University of Michigan, CAEN Mac-Systems I had similar problems getting Appleshare File Servers to drag-n-drop. My FREF's now include APPL, PREF, disk, & fold. I don't use the wildcard, and my drop seems to work. I was told that the Finder treats AShare File Servers as folders for some strange reason, and that is why I have to deal with the whole problem of distinguishing real folders from volumes. I don't know how well this applies to your problem, but perhaps you may investigate what the Finder thinks it is when it send the ODOC event. Remember that something is treating the CD as a mountable volume, and is probably mucking about with the volume queue to do it-- so perhaps Audio-CD's have a special file type. fprefect@caen.engin.umich.edu Matt Slot, CAEN Mac-Support +++++++++++++++++++++++++++ From: greggor@Apple.COM (Greg L. Anderson) Date: 15 Jul 92 00:25:31 GMT Organization: Apple Computer Inc., Cupertino, CA In article <1992Jul14.061616.7910@terminator.cc.umich.edu> leonardr@ccs.itd.umich.edu writes: >>I guess my main question is do I need the 'fold' and '****' to make the 'disk' >>part work? > For reasons that no one has ever explaned to me (other than a bug >in the Finder ;), you MUST have '****' to use either fold or disk - you >don't have to have all three. Nope, not true--I just built an App with 'fold' and 'disk', and it accepts both folders and disks. It does not have '****' in the FREF. The bad news is that you must have 'fold' in your FREF if you expect to receive drops from disks. This is because the 7.0 Finder gets confused when it sees a disk, and thinks it's a folder and checks to see if your app will accept 'fold' instead of checking for 'disk'. Any app with 'fold' in its FREF will accept drops from both folders and disks in System 7.0 and 7.0.1. 'disk' is never checked for in these versions of the Finder. 7.1 fixes the bug, though, so you should have 'disk' in your FREF if you want to be able to receive drag-and-drop disks and not break with future Finders. - -- ===================== =========================== ===================== Greg Anderson Apple Computer, Inc. O Ponnuki O Macintosh Bodhisattva Macintosh System Software O O is ideal O O greggor@apple.com Finder Team O shape O ===================== =========================== ===================== +++++++++++++++++++++++++++ From: stanger@otago.ac.nz (Nigel Stanger) Date: 15 Jul 92 15:26:37 +1300 Organization: University of Otago, Dunedin, New Zealand fprefect@engin.umich.edu (Matt Slot) writes: > > I had similar problems getting Appleshare File Servers to drag-n-drop. My > FREF's now include > APPL, PREF, disk, & fold. I don't use the wildcard, and my drop seems > to work. I was told [...] You'll like this. One of my apps handles disk dropping, but it's BNDL only contains '****' and 'fold'. It doesn't have 'disk' at all! Works great. And as far as the app is concerned, it's just another FSSpec. You have to test for parID = fsRtParID to tell whether it's a disk or not. - ---------------------------------------------------------------------- Nigel Stanger, Internet: stanger@otago.ac.nz University of Otago, Phone: +64 3 479-8179 Dunedin, NEW ZEALAND. Fax: +64 3 479-8311 String Quartet: see RUBBER BAND. +++++++++++++++++++++++++++ From: Andreas Wuertz <wuertz@systech.tik.ethz.ch> Organization: Swiss Federal Institute of Technology, TIK Date: Wed, 15 Jul 1992 07:15:27 GMT In article <mxmora-130792104617@css-mac1.sri.com> Matthew Xavier Mora, mxmora@unix.sri.com writes: >I'm working on a system seven only app and I can't get disk "drag and >drop" to work. I did everyting IM vol 6 said to do but the finder >will not hilight my app when I drag a disk icon over it. Beta testers >tell me it won't work on their machines either. ( I thought it might be >a desktop database problem) So how do you get disk dropping to work? Stupid Question: Did you set the app's bundle bit? Andy from TIK ======================================================= The earliest time for a program to be bug-free is, when it's out of date. The latest time for a programmer to retire is, when he writes such a program. ======================================================= +++++++++++++++++++++++++++ From: Andreas Wuertz <wuertz@systech.tik.ethz.ch> Organization: Swiss Federal Institute of Technology, TIK Date: Wed, 15 Jul 1992 07:16:19 GMT In article <mxmora-130792104617@css-mac1.sri.com> Matthew Xavier Mora, mxmora@unix.sri.com writes: >I'm working on a system seven only app and I can't get disk "drag and >drop" to work. I did everyting IM vol 6 said to do but the finder >will not hilight my app when I drag a disk icon over it. Beta testers >tell me it won't work on their machines either. ( I thought it might be >a desktop database problem) So how do you get disk dropping to work? Stupid Question: Did you set the app's bundle bit? Andy from TIK ======================================================= The earliest time for a program to be bug-free is, when it's out of date. The latest time for a programmer to retire is, when he writes such a program. ======================================================= --------------------------- From: wong_a@summer.chem.su.oz.au Subject: ioCompletion and AppleTalk Organization: School of Chemistry, University of Sydney Date: Wed, 15 Jul 1992 01:14:02 GMT What parameters are passed back to an ioCompletion routine in AppleTalk? Say for example in a ATPParamBlock, where can I hide my oldA5 pointer? Any examples of ioCompletion routines would be appreciated.... Thanks Adrian. - ----------------------------------------------------------------------------- Adrian Wong, Dept.of Theoretical Chemistry wong_a@summer.chem.su.oz.au University of Sydney NSW 2006 Australia 061-2-692 4137 +++++++++++++++++++++++++++ From: zobkiw@world.std.com (Joe Zobkiw) Date: 14 Jul 92 17:00:12 GMT Organization: The World Public Access UNIX, Brookline, MA << What parameters are passed back to an ioCompletion routine in AppleTalk? Say for example in a ATPParamBlock, where can I hide my oldA5 pointer? >> Most parameter blocks contain a refcon that you can use for your own data. You can also do something like in many cases: typedef struct { ATPParamBlock atpBlock; MyXtraInfo xtraInfo; } CustomATPBlock; In theory, you can pass a CustomATPBlock to any routine that wants a ATPParamBlock and it _might_ work for you. This is mostly seen when people want to have data associated with a WinowPtr. You might see typedef struct { WindowPtr w; MyXtraInfo xtraInfo; } Hope this helps. - -- - ------------------------------------------------------------- joe zobkiw zobkiw@world.std.com aol: aflzobkiw +++++++++++++++++++++++++++ From: jcav@quads.uchicago.edu (JohnC) Date: 14 Jul 92 17:27:43 GMT Organization: The Royal Society for Putting Things on Top of Other Things In article <BrE1wE.2J6@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes: ><< What parameters are passed back to an ioCompletion routine in AppleTalk? >Say for example in a ATPParamBlock, where can I hide my oldA5 pointer? >> > >Most parameter blocks contain a refcon that you can use for your own data. >You can also do something like in many cases: > >typedef struct { > ATPParamBlock atpBlock; > MyXtraInfo xtraInfo; >} CustomATPBlock; > >In theory, you can pass a CustomATPBlock to any routine that wants a >ATPParamBlock and it _might_ work for you. This is mostly seen when ^^^^^^^ >people want to have data associated with a WindowPtr. I see no need to qualify your statement with "might". There's no reason that such a tactic would fail in any case involving a fully-documented OS structure. People do it all the time. - -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953 B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637 +++++++++++++++++++++++++++ From: peirce@outpost.SF-Bay.org (Michael Peirce) Date: 14 Jul 92 17:57:53 GMT Organization: Peirce Software In article <1992Jul14.201402.1@summer.chem.su.oz.au> (comp.sys.mac.programmer), wong_a@summer.chem.su.oz.au writes: > > What parameters are passed back to an ioCompletion routine in AppleTalk? > Say for example in a ATPParamBlock, where can I hide my oldA5 pointer? > Any examples of ioCompletion routines would be appreciated.... I describe a useful technique in Programming With AppleTalk. It works like this: Declare an "extended" parameter block something like this: myATPParamBlock = RECORD dataPtr : LongInt; realATPPB : ATPParamBlock; END; {myATPParamBlock} This puts the address of your data block (containing any context you need at interrupt time) four bytes in front of the parameter block. This means that it can be easily access off of register A0 at completion time (A0 contains a pointer to your parameter block). I prefer to put the extra data pointer in front of the block because then the same code works with a variety of parameter block sizes. Next I issue an AppleTalk call something like the following: IF PGetRequest(@inATPPB.realATPPB,kASYNC) <> noErr THEN ... I set my ioCompletion routine to point to some assembly language glue that looks like the following: ;--------------------------------------------------------- ; ; Example Resident Code Macro Glue ; ; The idea here is that the completion routines need ; to have some context (the data block where we store ; all our variables) when they run. So what we do ; here in front of the io block, and push it onto the ; stack. This allows the Pascal code to take it in ; as a parameter and then do a nice big WITH. The ; effect is that all data is stored off A4 (setup by ; the with) instead of A5 (bad carma is used from ; within a completion routine. ; ; Oh yes, we also do the usual register store/reload ; stuff here so we don't step on interrupted code. ; BLANKS ON INCLUDE '::AIncludes:SysEqu.a' IMPORT INCOMING ;--------------------------------------------------------- XINCOMING PROC EXPORT ; Glue for INCOMING procedure MOVEM.L D3-D7/A2-A6,-(A7) ; save them registers MOVE.L -4(A0),D0 ; get our block pointer MOVE.L D0,-(A7) ; pass it as a parameter JSR INCOMING ; call Pascal routine MOVEM.L (A7)+,A2-A6/D3-D7 ; restore the registers RTS ;--------------------------------------------------------- END This calls my Pascal routine that does the real work. It looks something like this: (********************************************************) PROCEDURE Incoming( dataBlock : DataBlockPtr); BEGIN {Incoming} WITH dataBlock^ DO BEGIN etc...... END; Of course you can do something very similar with C rather than Pascal if you'd rather. This is all written in MPW Pascal and Assembler and you can get a more thorough explaination in Programming with AppleTalk from Addison-Wesley ISBN: 0-201-57780-1 57780 - -- Michael Peirce -- peirce@outpost.SF-Bay.org - -- Peirce Software -- Suite 301, 719 Hibiscus Place - -- -- San Jose, California USA 95117 - -- Makers of... -- voice: (408) 244-6554 fax: (408) 244-6882 - -- SMOOTHIE -- AppleLink: peirce & America Online: AFC Peirce --------------------------- From: wdh@well.sf.ca.us (Bill Hofmann) Subject: Catching phys ATalk connection Organization: Whole Earth 'Lectronic Link Date: Tue, 14 Jul 1992 16:27:10 GMT OK, here's a question for y'all: I want to notice when a user plugs in their appletalk cable, in particular when they're connected to a zone. There doesn't appear to be an AppleTalk transition event for this happening. The only thing that comes to my mind is every so often polling for GetMyZone. If you're not connected, you'll fail immediately, and if you're connected, you'll get a zone back quick, except for the first transition in either direction, which seems to take a couple of seconds. Is this the only way? - -Bill Hofmann +++++++++++++++++++++++++++ From: jcav@quads.uchicago.edu (JohnC) Date: 14 Jul 92 17:38:47 GMT Organization: The Royal Society for Putting Things on Top of Other Things In article <wdh.711131230@well.sf.ca.us> wdh@well.sf.ca.us (Bill Hofmann) writes: >OK, here's a question for y'all: I want to notice when a user plugs in their >appletalk cable. Yeep! I don't think that's really safe to do without restarting, in order to obtain an unused node address, etc. I believe that the Network control panel does a "soft reboot" of Appletalk when you change connections, but I don't think there's any other way. - -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953 B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637 --------------------------- End of C.S.M.P. Digest **********************